package com.ruoyi.project.syl_DZ.D.q.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.syl_DZ.D.q.mapper.OutpatientRegisterMapper2;
import com.ruoyi.project.syl_DZ.D.q.domain.OutpatientRegister2;
import com.ruoyi.project.syl_DZ.D.q.service.IOutpatientRegisterService2;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-17
 */
@Service
public class OutpatientRegisterService2Impl implements IOutpatientRegisterService2
{
    @Autowired
    private OutpatientRegisterMapper2 outpatientRegisterMapper2;

    /**
     * 查询【请填写功能名称】
     *
     * @param registerSort 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public OutpatientRegister2 selectOutpatientRegisterById(Long registerSort)
    {
        return outpatientRegisterMapper2.selectOutpatientRegisterById(registerSort);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param outpatientRegister 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<OutpatientRegister2> selectOutpatientRegisterList(OutpatientRegister2 outpatientRegister)
    {
        return outpatientRegisterMapper2.selectOutpatientRegisterList(outpatientRegister);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param outpatientRegister 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertOutpatientRegister(OutpatientRegister2 outpatientRegister)
    {
        outpatientRegister.setCreateTime(DateUtils.getNowDate());
        return outpatientRegisterMapper2.insertOutpatientRegister(outpatientRegister);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param outpatientRegister 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateOutpatientRegister(OutpatientRegister2 outpatientRegister)
    {
        outpatientRegister.setUpdateTime(DateUtils.getNowDate());
        return outpatientRegisterMapper2.updateOutpatientRegister(outpatientRegister);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param registerSorts 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteOutpatientRegisterByIds(Long[] registerSorts)
    {
        return outpatientRegisterMapper2.deleteOutpatientRegisterByIds(registerSorts);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param registerSort 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteOutpatientRegisterById(Long registerSort)
    {
        return outpatientRegisterMapper2.deleteOutpatientRegisterById(registerSort);
    }
}
